home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
SciAn
/
src
/
bop.h
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
1KB
|
76 lines
#include <stdio.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef TINY
#define TINY -HUGE
#endif
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#define MATCH(a, b) (strncmp((a), (b), strlen((b))) == 0)
#define BOP_NEXT_POLY(a, b) \
(Bop_Polygon *)((char *)(b) + ((a)->bytes_per_poly))
#define VERTS 1
#define CONNS 2
#define SCALARS 3
#define BOP_GEOM 1
#define BOP_SCALAR 2
#define BOP_CUR_POLY 3
#define BOP_MAX_VERTS 10
#define BOP_VPP 1
#define BOP_FTYPE 2
typedef struct {
unsigned long index;
float x, y, z, data;
} Bop_Vert;
typedef struct {
int nvert;
Bop_Vert vert[1];
} Bop_Polygon;
typedef struct {
int nvert;
Bop_Vert vert[2];
} Bop_Two_Polygon;
typedef struct {
unsigned int type;
unsigned int vert_per_poly;
unsigned int bytes_per_poly;
unsigned long nvert, nconn, npoly;
float xmin, xmax;
float ymin, ymax;
float zmin, zmax;
float smin, smax;
} Bop_Bounds;
typedef struct {
FILE *fp;
int modified;
struct stat status;
Bop_Bounds info;
} Bop_Ptr;
extern void bop_clear();
extern void bop_close();
extern void bop_update();
extern int bop_write();
extern int bop_set();
extern Bop_Ptr *bop_open();
extern Bop_Ptr *bop_open_lock();
extern Bop_Polygon *bop_read();